<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="base/head::head"/>
<!--参照信息,如对应分类信息-->
<body>
<div th:replace="base/load::load"/>
<div id="table-tool">
    <a id="btn-add" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="onOpenAddDialog()">新增</a>
    <a id="btn-edit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="onOpenEditDialog()">修改</a>
    <a id="btn-remove" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="onRemove()">删除</a>
    <a id="btn-refresh" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-refresh',plain:true" onclick="onRefresh()">刷新</a>
</div>
<table id="table" class="easyui-datagrid" data-options="url:'page',method:'get',pagination:true,pageSize:30,pageList:[20,30,40,50],fit:true,singleSelect:false,rownumbers:true,toolbar:'#table-tool'">
    <thead>
    <tr>
        <th data-options="field:'id',checkbox:true"></th>
        <th data-options="field:'referName',width:100">参照标识</th>
        <th data-options="field:'referDisplay',width:100">显示名称</th>
        <th data-options="field:'referType',width:100">参照类型</th>
        <th data-options="field:'referTitle',width:100">显示标题</th>
        <th data-options="field:'referSql',width:100">数据来源</th>
        <th data-options="field:'sqlParam',width:100">参数配置</th>
        <th data-options="field:'showType',width:100">组件类型</th>
        <th data-options="field:'showOrder',width:100">显示顺序</th>
        <th data-options="field:'referComment',width:100">备注</th>
    </tr>
    </thead>
</table>
<!--弹出框-->
<div id="dialog" class="easyui-dialog uq_dialog" data-options="title:'操作',closed:true,buttons:'#dialog-tool'">
    <form id="form" method="post">
        <input id="id" name="id" type="hidden"/>
        <table>
            <tr>
                <td>参照标识:</td>
                <td><input id="referName" name="referName" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,45]',prompt:'参照唯一标识'"/></td>
                <td>显示名称:</td>
                <td><input id="referDisplay" name="referDisplay" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,128]',prompt:'显示名称'"/></td>
            </tr>
            <tr>
                <td>参照类型:</td>
                <td>
                    <select id="referType" name="referType" class="easyui-combobox" style="width: 200px" data-options="value:'biz',required:true,validType:'length[1,10]',panelHeight:'auto',prompt:'参照类型'">
                        <option value="system">基础业务</option>
                        <option value="biz">自定义业务</option>
                    </select>
                </td>
                <td>显示标题:</td>
                <td><input id="referTitle" name="referTitle" class="easyui-textbox" style="width: 200px" data-options="validType:'length[1,128]',prompt:'{‘key’:’字段’,’display’:’显示’}'"/></td>
            </tr>
            <tr>
                <td>显示组件:</td>
                <td>
                    <select id="showType" name="showType" class="easyui-combobox" style="width: 200px" data-options="value:'combobox',panelHeight:'auto',required:true">
                        <option value="combobox">下拉框</option>
                        <option value="combotree">树状</option>
                        <option value="grid">表格</option>
                    </select>
                </td>
                <td>显示顺序:</td>
                <td><input id="showOrder" name="showOrder" class="easyui-numberspinner" style="width: 200px" data-options="min:0,required:true,prompt:'排序'"/></td>
            </tr>
            <tr>
                <td>参照sql:</td>
                <td colspan="3"><input id="referSql" name="referSql" class="easyui-textbox" style="width: 100%" data-options="multiline:true,height:60,required:true,validType:'length[1,256]',prompt:'参照sql'"/></td>
            </tr>
            <tr>
                <td>参数配置:</td>
                <td colspan="3"><input id="sqlParam" name="sqlParam" class="easyui-textbox" style="width: 100%" data-options="validType:'length[1,128]',prompt:'sql参数配置'"/></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td colspan="3"><input id="referComment" name="referComment" class="easyui-textbox" style="width: 100%" data-options="validType:'length[1,256]'"/></td>
            </tr>
        </table>
    </form>
</div>
<div id="dialog-tool">
    <a id="dialog-save" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="onSave()">保存</a>
    <a id="dialog-close" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-close'" onclick="javascript:$('#dialog').dialog('close')">关闭</a>
</div>
<script type="text/javascript" th:src="@{/utils/System.js}"></script>
</body>
</html>

